import {TableListItem} from '../data.d';
import React from 'react';
import {Dropdown, Menu, Icon} from 'antd';

const MoreBtn: React.FC<{ item: TableListItem, onTrigger: (id: number) => void }> = ({item,onTrigger}) => (
  <Dropdown
    overlay={
      <Menu onClick={() => onTrigger(item.id)}>
        <Menu.Item key="delete">删除</Menu.Item>
      </Menu>
    }
  >
    <a>
      更多 <Icon type="down"/>
    </a>
  </Dropdown>
);
export default MoreBtn;
